package jsu.ask.util;
/**
 * @ClassName: DataSourceContextHolder
 * @Description: 数据库切换工具类
 * @author: wzx
 * @date: 2016-07-27 上午10:26:01
 */
public class DataSourceContextHolder {
    private static final ThreadLocal<String> contextHolder = new ThreadLocal<String>();

    public static void setDbType(String dbType) {
        contextHolder.set(dbType);
    }

    public static String getDbType() {
        return ((String) contextHolder.get());
    }

    public static void clearDbType() {
        contextHolder.remove();
    }
}
